<!DOCTYPE html>
<html>
<head>
	<meta charset="UTF-8">
	<title>对话框之工具栏和按钮 - jQuery EasyUI 演示</title>
	<meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
	<link rel="stylesheet" type="text/css" href="../../themes/default/easyui.css">
	<link rel="stylesheet" type="text/css" href="../../themes/icon.css">
	<link rel="stylesheet" type="text/css" href="../demo.css">
	<script type="text/javascript" src="../../jquery.min.js"></script>
	<script type="text/javascript" src="../../jquery.easyui.min.js"></script>
</head>
<body>
	<h2 title="Toolbar and Buttons">对话框之工具栏和按钮</h2>
	<p title="The toolbar and buttons can be added to dialog.">　　工具栏和按钮可被添加到对话框上。</p>
	<div style="margin:20px 0;">
		<a href="javascript:void(0)" class="easyui-linkbutton" onclick="$('#dlg').dialog('open')">打开</a>
		<a href="javascript:void(0)" class="easyui-linkbutton" onclick="$('#dlg').dialog('close')">关闭</a>
	</div>
	<div id="dlg" class="easyui-dialog" title="<h title='Toolbar and Buttons'>&nbsp;工具栏和按钮</h>" style="width:400px;height:200px;padding:10px"
			data-options="
				iconCls: 'icon-save',
				toolbar: [{
					text:'新增',
					iconCls:'icon-add',
					handler:function(){
						alert('已新增！')
					}
				},'-',{
					text:'保存',
					iconCls:'icon-save',
					handler:function(){
						alert('已保存！')
					}
				}],
				buttons: [{
					text:'确认',
					iconCls:'icon-ok',
					handler:function(){
						alert('已确认！');
					}
				},{
					text:'取消',
					handler:function(){
						alert('已取消！');;
					}
				}]
			">
		此处为对话框内容……
	</div>
	
</body>
</html>